package woshiheima5;

import java.text.ParseException;
import java.util.Calendar;
import java.util.Date;

public class DataDemo {
    public static void main(String[] args) throws ParseException {
        Date date = new Date();
      /* //将时间转换为字符串
        DataUntil.dataToString(date,"yyyy年MM月dd日 HH:mm:ss");
        System.out.print(date);*/

       //将字符串转换为时间
        String s = "2011041311110000";
        Date dd=DataUntil.stringToDate(s,"yyyyMMddHHmmss");
        System.out.print(dd);

       /* //Calendar日历遍历
        Calendar c=Calendar.getInstance();
        int year = c.get(Calendar.YEAR);
        int month  = c.get(Calendar.MONTH)+1;
        int date1 = c.get(Calendar.DATE);
        System.out.print(year+"年"+month+"月"+date1+"日");*/


    }


}
